import Cookies from 'js-cookie'

const TokenKey = 'vue_admin_template_token'
// 也是一种浏览器本地存储的方式
export function setToken(token) {
  return Cookies.set(TokenKey, token)
}
export function getToken() {
  return Cookies.get(TokenKey)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

// 开始存时间戳
const timeKey = 'timstamp-key'

export function getTonkenKey() {
  return Cookies.get(timeKey)
}

export function setTonkenKey() {
  return Cookies.set(timeKey, Date.now())
}

